package com.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dao.CustomerDao;
import com.entity.Customer;
import com.entity.Pagination;

@Service
public class CustomerServiceImp implements CustomerService {
	@Autowired
	private CustomerDao customerDao;

	@Override
	public List<Customer> getAllCustomers(Pagination pagination,Customer Customer) {
		return customerDao.getAllCustomers(pagination,Customer);
	}

	@Override
	public Integer insertCustomer(Customer Customer) {
		return customerDao.insertCustomer(Customer);
		
	}

	@Override
	public Integer deleteCustomer(Customer Customer) {
		return customerDao.deleteCustomer(Customer);
	}

	@Override
	public int countAll(Customer Customer) {
		return customerDao.countAll(Customer);
	}

	@Override
	public Integer updateCustomer(Customer Customer) {
		return customerDao.updateCustomer(Customer);
	}

	@Override
	public Customer findById(Integer id) {
		return customerDao.findById(id);
	}
}
